package day1122;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public class C1 {
    public static void main(String[] args) throws SQLException, ClassNotFoundException {
        Class.forName("com.mysql.cj.jdbc.Driver");//1.
        Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql?serverTimezone=GMT%2B8&useSSL=false",
                "root","root");//2.

        Statement stmt=conn.createStatement();
        stmt.execute("create database  big1_1120");
        //把getConnection方法获取的java对象用conn变量代表
        conn.close();
    }//com.mysql.cj.jdbc是包名，   Driver是类名
}